import { reactive, ref } from "vue"

export const lecture_query = reactive({
    id: "",
    name: "",
    place: "",
});

export const Lecture = ref({
    lectureContent: "",
    lecturePlace: "",
    lectureTime: "",
});

export const LectureRules = ref({
    lectureContent: [
        {
            required: true,
            message: '请输入培训内容',
            trigger: 'blur'
        },
    ],
    lectureTime: [
        {
            type: 'date',
            required: true,
            message: '请选择培训时间',
            trigger: 'change',
        },
    ],
    lecturePlace: [
        {
            required: true,
            message: '请输入培训地点',
            trigger: 'blur'
        },
    ],
})

export interface LectureData {
    createTime: string,
    deleted: boolean,
    id: number,
    isNotificated: boolean,
    lectureContent: string,
    lectureName: string,
    lecturePlace: string,
    lectureTime: string,
    teacherId: number,
    updateTime: string,
}

interface PageData {
    page: number,
    count: number,
    pagesize: number,
}

export class LectureListData {
    selectData: PageData = {
        page: 1,
        count: 0,
        pagesize: 5,
    }
    LectureList: LectureData[] = []
}